package cn.maihe.elg.operation.supports.electronicseal.kt.cloudsign.service;

import cn.maihe.elg.operation.supports.electronicseal.kt.KtConfig;
import cn.maihe.elg.operation.supports.electronicseal.kt.cloudsign.BaseKtCloudSignService;
import cn.maihe.elg.operation.supports.electronicseal.kt.cloudsign.dto.ContractQueryReqDTO;
import cn.maihe.elg.operation.supports.electronicseal.kt.cloudsign.dto.ContractQueryRespDTO;
import cn.maihe.elg.operation.supports.electronicseal.kt.cloudsign.enums.CloudSignInterfaceEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Description
 * @Author WJH
 * @Date 2022/09/07
 */
@Service
@Slf4j
public class ContractQueryService extends BaseKtCloudSignService<ContractQueryReqDTO, ContractQueryRespDTO> {
    public ContractQueryService(KtConfig ktConfig) {
        super(ktConfig);
    }

    @Override
    protected CloudSignInterfaceEnum serviceName() {
        return CloudSignInterfaceEnum.contractQuery;
    }


    public ContractQueryRespDTO queryContractStatus(String acceptOrderNo, String channelContractId) {
        ContractQueryReqDTO reqDTO = new ContractQueryReqDTO();
        reqDTO.setSid(channelContractId);
        ContractQueryRespDTO respDTO = this.doService(acceptOrderNo, reqDTO);
        return respDTO;
    }
}
